<!DOCTYPE html>
<html lang="zh-CN"
	  xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org"
	  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	  layout:decorator="fragments/adminModel">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="/basic/validate/bootstrapValidator.js"></script>
<title>修改用户</title>
</head>
<body>
	<div th:fragment="content" th:remove="tag">
		<div class="header lighter smaller blue">
			<h3><i class="fa fa-pencil"></i>&nbsp;修改用户 </h3>
			<div th:replace="admin/basic/user/nav :: content" th:remove="tag"></div>
		</div>

		<form method="POST" th:object="${user}" id="dataForm">
			<div class="form-group form-group-lg">
				<label for="nickname">用户昵称</label>
				<input type="text" name="nickname" class="form-control" th:value="${user.nickname}" id="nickname" placeholder="请输入用户昵称"/>
			</div>
			<div class="form-group form-group-lg">
				<label for="username">登陆用户名</label>
				<input type="text" name="username" readonly="true" class="form-control" th:value="${user.username}" id="username" placeholder="请输入登陆用户名"/>
			</div>
			<div class="form-group form-group-lg">
				<div class="input-group input-group-lg">
					<div class="input-group-addon">用户状态</div>
					<div class="form-control">
						<input type="radio" name="status" value="1" id="status_1" th:checked="${user.status == 1}?'checked'"/><label for="status_1">启用</label>
						<input type="radio" name="status" value="0" id="status_0" th:checked="${user.status == 0}?'checked'"/><label for="status_0">停用</label>
					</div>
				</div>
			</div>
			<input type="hidden" name="token" th:value="${session.token}"/>
			<button type="submit" class="btn btn-primary">确定提交</button>
		</form>
		<script type="text/javascript">
			jQuery(function($) {
				$('#dataForm').bootstrapValidator({
	//		        live: 'disabled',
					message: '验证不通过',
					feedbackIcons: {
						valid: 'glyphicon glyphicon-ok',
						invalid: 'glyphicon glyphicon-remove',
						validating: 'glyphicon glyphicon-refresh'
					},
					fields: {
						nickname: {
							validators: {
								notEmpty: {
									message: '请输入用户昵称'
								}
							}
						}
					}
				});
			});
		</script>
	</div>
</body>
</html>